package com.example.util.redis;

import com.example.util.SpringBeanUtil;
import com.example.util.redis.redisUtil.RedisUtil;

/**
 * @author zhaol
 */
public class RedisPlugin {

    private static final CtRedisUtil redisUtil;

    private static final RedisUtil redisUtil2;

    private RedisPlugin() {
    }

    static {
        redisUtil = SpringBeanUtil.getBean("ctRedisUtil", CtRedisUtil.class);
        redisUtil2 =  SpringBeanUtil.getBean("redisUtil", RedisUtil.class);
    }

    /*private static synchronized void init() {
        redisUtil = new RedisUtil();
    }*/

    public static CtRedisUtil use() {
        return redisUtil;
    }

    public static RedisUtil useRedisUtil() {
        return redisUtil2;
    }
}
